import babel from '@rollup/plugin-babel'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { obfuscator } from 'rollup-obfuscator';
import { uglify } from 'rollup-plugin-uglify'
import css from "rollup-plugin-import-css";

export default {
    input: "./src/index.js",
    output: [
        {
            file: './dist/gis-map.min.js',
            name: 'GISMap',
            format: 'umd',
            sourcemap: false
        }
    ],
    plugins: [
        babel({
            exclude: 'node_modules/**'
        }),
        resolve(),
        commonjs(),
        css(),
        obfuscator(),
        // js 压缩插件，需要在最后引入
        uglify()
    ]
}
